package com.tigerhhzz.myribbonrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author tigerhhzz
 * @date 2023/4/14 14:53
 */
@Configuration
public class MyRibbonRuleConfig {

    @Bean
    public IRule MyRibbonRuleConfig(){
        //定义随机负载均衡算法
        return new RandomRule();
    }
}
